-- 达梦数据库初始化脚本

-- 创建用户表
CREATE TABLE IF NOT EXISTS t_user (
  id NUMBER(20) IDENTITY PRIMARY KEY,
  username VARCHAR(50) NOT NULL,
  real_name VARCHAR(50),
  age NUMBER(3),
  email VARCHAR(100),
  create_time TIMESTAMP NOT NULL DEFAULT SYSTIMESTAMP,
  update_time TIMESTAMP NOT NULL DEFAULT SYSTIMESTAMP
);

-- 插入测试数据
INSERT INTO t_user (username, real_name, age, email, create_time, update_time)
VALUES 
('zhangsan', '张三', 28, 'zhangsan@example.com', SYSTIMESTAMP, SYSTIMESTAMP);

INSERT INTO t_user (username, real_name, age, email, create_time, update_time)
VALUES 
('lisi', '李四', 32, 'lisi@example.com', SYSTIMESTAMP, SYSTIMESTAMP);

INSERT INTO t_user (username, real_name, age, email, create_time, update_time)
VALUES 
('wangwu', '王五', 25, 'wangwu@example.com', SYSTIMESTAMP, SYSTIMESTAMP); 